package com.wxdc.nmgyt.nmgytwydc.dagger.module;

import android.app.Activity;
import android.support.v4.app.Fragment;

import com.wxdc.nmgyt.nmgytwydc.dagger.scope.FragmentScope;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2018/4/25.
 */
@Module
public class FragmentModule {
    private Fragment mFragment;

    public FragmentModule(Fragment fragment) {
        mFragment = fragment;
    }
    @Provides
    @FragmentScope
    public Activity provideActivity(){
        return mFragment.getActivity();
    }
}
